Artifact reduction for image style transfer

ABSTRACT

An image processing system transforms content images into the style of another reference style image. For example, the system applies a noise mask to generate noisy versions of the content images. The system then recomposes a content image in the style of a reference image by applying computer models to the noisy version of the content image, which reduces artifacts in the stylized image compared to that of a stylized image generated by applying the computer models to the original content image. When the content images are part of a video sequence, the image processing system may adjust the noise mask applied in a subsequent frame such that it tracks the movement of the client device from the current frame to the subsequent frame. This allows the system to reduce artifacts while stylizing the frames of the video in a consistent manner.

BACKGROUND

This invention relates generally to transforming images, and moreparticularly to transforming images in the style of other images.

Style transfer recomposes content images in the style of one or morereference style images. For example, a photograph of a house can berecomposed into the unique style of artists such as Vincent van Gogh orClaude Monet. Specifically, a content image can be recomposed in thestyle of the reference image by applying image transformation models tothe content image to generate a stylized image. The stylized imagepreserves high-level spatial features of the content image whileincorporating stylistic features of the reference image, such astexture, color palette, length and curvature of brushstrokes, and thelike. For example, a stylized image of the house in the style of “TheStarry Night” of Vincent van Gogh may preserve the high-level structuresof the house, such as the roof, exterior walls, and large windows, whileincorporating the predominantly blue color palette and the distinctbrushwork of the artist.

By using computer models, content images can be recast in a variety ofdifferent styles in a relatively short amount of time without the needfor creating the stylized image from scratch. However, many computermodels for style transfer introduce undesired artifacts in the stylizedimage due to high non-linearity of image transformation models.

SUMMARY

Embodiments of the invention transform content images into the style ofone or more reference style images. For example, an image processingsystem applies a noise mask to content images to generate noisy versionsof the content images. The system recomposes a content image in thestyle of one or more reference images by applying computer models to thenoisy version of the content image. Applying the computer models to thenoisy version of the content image reduces artifacts in the stylizedimage compared to that of a stylized image generated by applying thecomputer models to the original content image.

Specifically, the image processing system receives content images from aclient device. The system also receives a request to stylize the contentimages in the style of one or more reference images. The content imagesmay be individual images, or may be part of a video sequence of frames.The image processing system applies a noise mask to a content image togenerate a noisy version of the content image. One or more imagetransformation models are applied to the noisy version of the contentimage to generate the stylized image. Applying the noise mask especiallyhelps reduce artifacts in flat regions of images that are groups ofcontiguous pixels having similar color and/or patterns. For example,flat regions may be segments of walls, sky, and grass in an image.

In one embodiment, when the content images are part of a video sequence,the system generates noisy versions of the frames of the video sequence,and generates the stylized video by applying the image transformationmodels to the noisy frames. Given a noise mask applied in a currentframe, the image processing system may adjust the noise mask applied ina subsequent frame such that it tracks the movement of the client devicefrom the current frame to the subsequent frame. This allows the imageprocessing system to apply same noise mask patterns to portions of thecurrent frame and the subsequent frame that include partiallyoverlapping regions of the scene. Consequently, the image processingsystem can reduce irregularities in flat regions while stylizing theimages in a consistent manner throughout the video sequence. In oneembodiment, the noise mask may be adjusted by applying one or moregeometric transformations (e.g., translation, rotation, reflection) topixel values of the noise mask.

For example, a user may capture a video of a room with a flat regioncorresponding to a smooth wall, in which the user rotates the cameraaround the room. The image processing system may stylize a frame in thevideo sequence by applying a noise mask, and applying the imagetransformation models to the current frame. When the camera has beenrotated 5 degrees to the left in a subsequent frame, pixel values of thenoise mask for the subsequent frame may be translated 5 degrees to theright, such that same patterns of the noise mask are applied to portionsof the current frame and portions of the subsequent frame that includeoverlapping views of the dark wall.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a high level block diagram of a system environment for animage processing system, in accordance with an embodiment.

FIG. 2 is an example block diagram of an architecture of an imageprocessing system, in accordance with an embodiment.

FIG. 3 illustrates an example process for training an imagetransformation model, in accordance with an embodiment.

FIG. 4 is a flowchart illustrating a process of transforming images inthe style of a reference image, in accordance with an embodiment.

FIG. 5 is a flowchart illustrating a process of transforming videosequences in the style of a reference image, in accordance with anembodiment.

The figures depict various embodiments of the present invention forpurposes of illustration only. One skilled in the art will readilyrecognize from the following discussion that alternative embodiments ofthe structures and methods illustrated herein may be employed withoutdeparting from the principles of the invention described herein.

DETAILED DESCRIPTION Overview

FIG. 1 is a high level block diagram of a system environment for animage processing system, in accordance with an embodiment. The systemenvironment 100 shown by FIG. 1 comprises one or more client devices116A, 116B, a network 120, and the image processing system 110. Inalternative configurations, different and/or additional components maybe included in the system environment 100. The embodiments describedherein can be adapted to online systems that are not social networkingsystems, such as advertising systems or ad publishing systems.

The client device 116 is a computing device capable of receiving userinput as well as communicating via the network 120. While a singleclient device 116 is illustrated in FIG. 1, in practice many clientdevices 116 may communicate with the systems in environment 100. In oneembodiment, a client device 116 is a conventional computer system, suchas a desktop or laptop computer. Alternatively, a client device 116 maybe a device having computer functionality, such as a personal digitalassistant (PDA), a mobile telephone, a smartphone or another suitabledevice. A client device 116 is configured to communicate via the network120. In one embodiment, a client device 116 executes an applicationallowing a user of the client device 116 to interact with the imageprocessing system 110. For example, a client device 116 executes abrowser application to enable interaction between the client device 116and the image processing system 110 via the network 120. In anotherembodiment, the client device 116 interacts with the image processingsystem 110 through an application programming interface (API) running ona native operating system of the client device 116, such as IOS® orANDROID™.

The client devices 116 provide content images to the image processingsystem 110 and requests stylization of the content images in the styleof one or more reference images. The content images may be individualimages, or a video sequence of images in which each content imagecorresponds to a frame in the video sequence. For example, a photographof a house can be recomposed into styles of artwork drawn by artistssuch as Vincent van Gogh or Claude Monet. The stylized image preserveshigh-level spatial features of the content image while incorporatingstylistic features of the reference image. For example, a stylized imageof the house in the style of “The Starry Night” of Vincent van Gogh maypreserve the overall spatial structure of the house, such as the roof,exterior walls, and large windows, while incorporating the predominantlyblue color palette and the distinct brushwork style of the artist.

In one embodiment, users of client devices 116 may select the referenceimages used for styling the content image. For example, users may selectlocally stored reference images in the client device 116A, and providethe selected reference images to the image processing system 110. Inanother embodiment, users of client device 116 may select referenceimages from a set of options supported by the image processing system110. For example, users may select a reference style image from a set ofimages supported and displayed by the image processing system 110. Asanother example, users may select from a set of artists displayed by theimage processing system 110 that are each associated with correspondingset of reference images.

The client devices 116 are configured to communicate via the network120, which may comprise any combination of local area and/or wide areanetworks, using both wired and/or wireless communication systems. In oneembodiment, the network 120 uses standard communications technologiesand/or protocols. For example, the network 120 includes communicationlinks using technologies such as Ethernet, 802.11, worldwideinteroperability for microwave access (WiMAX), 3G, 4G, code divisionmultiple access (CDMA), digital subscriber line (DSL), etc. Examples ofnetworking protocols used for communicating via the network 120 includemultiprotocol label switching (MPLS), transmission controlprotocol/Internet protocol (TCP/IP), hypertext transport protocol(HTTP), simple mail transfer protocol (SMTP), and file transfer protocol(FTP). Data exchanged over the network 120 may be represented using anysuitable format, such as hypertext markup language (HTML) or extensiblemarkup language (XML). In some embodiments, all or some of thecommunication links of the network 120 may be encrypted using anysuitable technique or techniques.

The image processing system 110 receives requests from client devices116 to recompose content images in the style of one or more referenceimages. The image processing system 110 generates stylized images byapplying image transformation models to the content images.Specifically, the image transformation models are computer models thatrecast the high-level spatial features of a content image usingstylistic features of one or more reference images to generate thestylized image. The image transformation models may capture stylisticfeatures such as texture, color palette, length and curvature ofbrushstrokes, and edge texture of the reference images. When the contentimages are a video sequence, the image processing system 110 may applythe image transformation models to each frame of the sequence togenerate a stylized version of the video.

In one embodiment, the request from the client device 116 includes aselection of a reference image by the user of the device 116 from amonga predetermined set of reference images supported by the imageprocessing system 110. In such an instance, the image processing system110 applies a pre-trained image transformation model associated with thereference image to the content image to generate the stylized image. Inanother embodiment, the request from the client device 116 includes adesired reference image along with the content image for stylization. Insuch an instance, the image processing system 110 may train an imagetransformation model associated with the reference image responsive toreceiving the request. The trained model is then applied to the contentimage to generate the stylized image.

By using computer models for stylization, images can be recast in avariety of different styles in a relatively short amount of time withoutre-drawing the stylized image from scratch. However, imagetransformation models can also introduce undesired artifacts in thestylized image due to the high non-linearity of the models. Artifactsmay be especially pronounced in portions of stylized imagescorresponding to flat regions. Flat regions are groups of contiguouspixels in an image that have similar color and/or patterns. For example,regions in an image corresponding to smooth walls, the sky, and grassmay be represented as flat regions. In particular, image transformationmodels may amplify small differences in pixel values of flat regionsresulting in irregularities in the stylized image. For example, evensmall differences in pixel values for a smooth wall between twosuccessive frames can be amplified when the video is stylized by themodels, resulting in significantly different stylizations of the wallbetween the two frames.

In one embodiment, the image processing system 110 applies the imagetransformation models to a noisy version of the content image to reduceartifacts in the stylized image. Specifically, the image processingsystem 110 applies a noise mask to a content image to generate a noisyversion of the content image. The image transformation models areapplied to the noisy version of the content image to generate thestylized image. Applying the noise mask particularly helps reduceartifacts in flat regions.

In one embodiment, when the content images are part of a video sequence,the image processing system 110 generates noisy versions of the framesof the video sequence, and generates the stylized video by applying thecomputer models to the noisy frames. Given a noise mask applied in acurrent frame, the image processing system 110 may adjust the noise maskapplied in a subsequent frame based on movement of the client device 116from the current frame to the subsequent frame. This allows the imageprocessing system 110 to apply same patterns of the noise mask toportions of the current frame and the subsequent frame that includeoverlapping regions of the scene, in particular portions of the framethat are characterized as flat regions. Consequently, the imageprocessing system 110 can generate a stylized video with reducedartifacts, and can also stylize the frames of the video in a consistentmanner since the patterns of the noise mask track the scene itself. Inone embodiment, the noise mask may be adjusted by applying one or moregeometric transformations (e.g., translation, rotation, reflection) topixel values of the noise mask.

For example, a user may capture a video of a room with a flat regioncorresponding to a smooth wall, in which the user rotates the cameraaround the room. The image processing system 110 may stylize a frame inthe video sequence by applying a noise mask, and applying the imagetransformation models to the current frame. When the camera has beenrotated 5 degrees to the left in a subsequent frame, pixel values of thenoise mask for the subsequent frame may be translated 5 degrees to theright, such that same patterns of the noise mask are applied to portionsof the current frame and portions of the subsequent frame that includeoverlapping views of the dark wall.

Image Processing System

FIG. 2 is an example block diagram of an architecture of the imageprocessing system 110, in accordance with an embodiment. The imageprocessing system 110 shown in FIG. 2 includes a management module 208,training module 212, a noise mask module 216, and a style transfermodule 220. The image processing system 110 also includes referenceimages 240 and image transformation models 244. In other embodiments,the image processing system 110 may include additional, fewer, ordifferent components for various applications. Conventional componentssuch as network interfaces, security functions, load balancers, failoverservers, management and network operations consoles, and the like arenot shown so as to not obscure the details of the system architecture.

The reference image store 240 stores a set of reference images. Thereference images may also be provided by users of client devices 116. Inone embodiment, the image processing system 110 organizes referenceimages according to stylistic characteristics such as artist, genre, andthe like. For example, reference images that are painted by the sameartist (e.g., Vincent van Gogh) or that are associated with the samegenre (“Impressionism”) can be grouped together.

The management module 208 receives and manages requests from users ofclient devices 116 for image stylization. Each request includes at leastone content image and a request to transform the content image in thestyle of one or more reference images. In one embodiment, a requestincludes content images and a reference image desired by the user of theclient device 116. In another embodiment, the management module 208 candisplay a set of predetermined reference images stored in the referenceimage store 240, in which stylization based on these images are alreadysupported by the image processing system 110. In such an instance, arequest can include content images and a selection of one or morereference images. In yet another embodiment, the management module 208can display a set of categories, such as artists and genres, eachassociated with one or more reference images. Thus, stylistic featurescan also be learned from a collection of reference images as a whole, inaddition to individual reference images themselves.

The training module 212 trains image transformation models forrecomposing content images in the style of one or more reference images.In one particular embodiment referred throughout the remainder of thespecification, the image transformation models are neural network modelssuch as convolutional neural networks (CNN), deep neural networks (DNN),recurrent neural networks (RNN), deep residual convolutional neuralnetworks, and the like.

In one embodiment, the training module 212 trains a set of imagetransformation models that are each associated with one or morereference images. When applied to a content image, each imagetransformation model recomposes the content image in the style of theone or more reference images associated with the model. For example, thetraining module 212 may train an image transformation model thatgenerates stylized images incorporating the stylistic features of “WaterLilies” by Claude Monet, another model that generates imagesincorporating the stylistic features of “The Starry Night” by Vincentvan Gogh.

Specifically, for each image transformation model, the training module212 constructs a training data set including a reference imageassociated with the model and a set of training images. In oneembodiment, the image transformation model fw(⋅) for a reference imageis a neural network model with a set of weights W, in which the valuesof the weights are determined by minimizing a loss function. The lossfunction includes a content loss l_(c) that relates to how well thecontent of an output image generated by applying the imagetransformation model to the training image matches that of the trainingimage. The loss function also includes a style loss l_(s) that relatesto how well the output image matches the style of the reference image.The training module 212 determines the set of weights W such that theoutput image minimizes a combination of the content loss l_(c) and thestyle loss l_(s). In this manner, the image transformation modelgenerates stylized output images that preserve high-level spatialstructures of the training images, while incorporating stylisticfeatures of the reference image.

In one embodiment, the training module 212 may solve the followingoptimization problem:

$\underset{W}{\arg \mspace{11mu} \min}\mspace{11mu} {E\left\lbrack {{\lambda_{c} \cdot {_{c}\left( {{f_{W}(x)},y_{c}} \right)}} + {\lambda_{s} \cdot {_{s}\left( {{f_{W}(x)},y_{s}} \right)}}} \right\rbrack}$

where x=y_(c) denotes the training image, y_(s) denotes the referenceimage, fw(x) denotes the output of the image transformation model whenapplied to a training image x, to determine optimal values for theweights W of the image transformation model. λ_(c) denotes the relativeweight of the content loss, and λ_(s) denotes the relative weight of thestyle loss. The expectation is taken over instances of the training dataset and minimization may be performed using any optimization algorithm,such as stochastic gradient descent.

In one embodiment, for each iteration of the optimization algorithm, thecontent loss between the output image fw(x) and the training image y_(c)is calculated by applying a pre-trained loss network model to the outputimage fw(x) and the training image y_(c). Specifically, the content lossis a function of the difference between spatial features of the outputimage fw(x) and the training image y_(c) extracted by the loss networkmodel. The style loss between the output image fw(x) and the referenceimage y_(s) is calculated by applying the pre-trained loss network modelto the output image fw(x) and the reference image y_(s). Specifically,the style loss is a function of the difference between stylisticfeatures of the output image fw(x) and the reference image y_(s)extracted by the loss network model. The loss network model may be anypre-trained network model for image classification. For example, theloss network model may be a convolutional deep neural network modelpre-trained for image classification tasks.

FIG. 3 illustrates an example process for training an imagetransformation model, in accordance with an embodiment. As shown in FIG.3, for each iteration of the optimization algorithm, the output fw(x) ofapplying the image transformation model on the training image x isgenerated based on the current estimate for W. The content loss l_(c) isgenerated by applying the loss network to the training image y_(c) andthe output image fw(x). The style loss l_(s) is generated by applyingthe loss network to the reference image y_(s) and the output imagefw(x).

Returning to FIG. 2, in one embodiment, the training module 212 may downsample the output image fw(x) and/or the training image y_(c) whenapplying the loss network model to calculate the loss function. In oneinstance, the output image fw(x) and/or the training image y_(c) is downsampled by one half (½) of the resolution of the original image. Downsampling increases the receptive field of the loss network model, andthus, allows the training module 212 to perform training in a fastertime frame, and in a more computationally efficient manner.

The training module 212 stores the image transformation models in theimage models store 244.

The noise mask module 216 generates and applies noise masks to contentimages of received requests. The noise masks are an array of pixels thateach have a random value sampled from a probability distribution. In oneparticular embodiment referred throughout the remainder of thespecification, the noise masks are of the same dimensionality (i.e.,same number of pixels) as the content images, and include pixel valuesthat are sampled from a Gaussian distribution. Thus, pixel values of thenoise mask may have a one-to-one location correspondence with pixelvalues of the content images due to the same dimensionality.

The noise mask module 216 generates a noise mask for a content image ina client request, and applies the noise mask to the content image. Thenoise mask can be applied by, for example, summing each pixel value ofthe noise mask with a corresponding pixel value of the content image.For example, the noise mask module 216 may sum a pixel located at thesecond row and the first column of the content image having a greyscaleintensity value of 240 with a pixel located at the same location of thenoise mask having a randomly sampled value of 0.9. The correspondingpixel in the resulting noisy version of the content image may have avalue of 240.9.

When the content images are part of a video sequence, the noise maskmodule 216 generates and applies noise masks to frames of the videosequence. In one embodiment, the noise mask module 216 may apply thesame noise mask to one or more frames of the video sequence. In anotherembodiment, the noise mask module 216 generates a noise mask for acurrent frame and generates a noise mask for a subsequent frame byadjusting the pixel values of the noise mask for the current frame basedon movement of the client device 116 from the current frame to thesubsequent frame.

Specifically, the noise mask module 216 may apply geometrictransformations to the pixel values of the noise mask such that thepatterns of the noise mask track the movement of the client device 116from the current frame to the subsequent frame, and thus, are fixed toregions of the scene itself. In this manner, the noise mask module 216applies the same noise mask pattern to a portion of the current frameand a portion of the subsequent frame that include overlapping regionsof the scene, especially regions characterized as flat regions. In oneembodiment, the noise mask module 216 may perform geometrictransformations such as translation, rotation, warping, reflection, andthe like, to pixels of the noise mask. For example, when the camera hasrotated 10 degrees upward from the current frame to the subsequentframe, the noise mask module 216 may translate pixels of the noise mask10 degrees downward such that the same noise patterns are applied toportions of the frames corresponding to the same part of a wall in thescene.

In one embodiment, the noise mask module 216 estimates the movement ofthe client device 116 between frames based on measurements received fromone or more sensors of the client device 116. In one instance, thesensors may be gyroscopes included in the client device 116 that measurerotations of the client device 116 with reference to one or more axes.In another embodiment, the noise mask module 216 may analyze thehomography between the current frame and the subsequent frame toestimate the movement of the client device 116 between two frames. Forexample, rotation or translation of the camera may be estimated from ahomography matrix based on analysis of the frames. The noise mask module216 may then use the estimated movement to adjust the noise mask forsubsequent frames.

The style transfer module 220 constructs stylized images for imagestylization requests provided by the management module 208. In oneembodiment, the style transfer module 220 identifies the imagetransformation model associated with the reference image of the request,and applies the identified image transformation model to the noisycontent images of the request, as generated by the noise mask module216. Since the noise mask is applied to the content images, includingany flat regions in the images, the style transfer module 220 cangenerate stylized images with reduced artifacts. Specifically, when thecontent images are part of a video sequence, the style transfer module220 can generate a stylized video with reduced artifacts in a consistentmanner when the noise patterns track movement of the client device 116.

Methods

FIG. 4 is a flowchart illustrating a process of transforming images inthe style of a reference image, in accordance with an embodiment.

The image processing system receives 410 a first image of a scene from aclient device. The system also receives 412 a request to generate astylized image of the first image in the style of a reference image. Thesystem generates 414 a first noise mask associated with the first image.The first noise mask is applied 416 to the first image to generate anoisy version of the first image. The system generates 418 the stylizedimage by applying an image transformation model to the noisy version ofthe first image. The stylized image is provided 420 to the clientdevice.

FIG. 5 is a flowchart illustrating a process of transforming videosequences in the style of a reference image, in accordance with anembodiment.

The image processing system receives 510 a second image of the scenethat is included in the video sequence. The system generates 512 asecond noise mask associated with the second image by adjusting thefirst noise mask based on movement of the client device from the firstimage to the second image. The second noise mask is applied 514 to thesecond image to generate a noisy version of the second image. The systemapplies 516 the image transformation model to the noisy version of thesecond image.

SUMMARY

The foregoing description of the embodiments of the invention has beenpresented for the purpose of illustration; it is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Persons skilled in the relevant art can appreciate that manymodifications and variations are possible in light of the abovedisclosure.

Some portions of this description describe the embodiments of theinvention in terms of algorithms and symbolic representations ofoperations on information. These algorithmic descriptions andrepresentations are commonly used by those skilled in the dataprocessing arts to convey the substance of their work effectively toothers skilled in the art. These operations, while describedfunctionally, computationally, or logically, are understood to beimplemented by computer programs or equivalent electrical circuits,microcode, or the like. Furthermore, it has also proven convenient attimes, to refer to these arrangements of operations as modules, withoutloss of generality. The described operations and their associatedmodules may be embodied in software, firmware, hardware, or anycombinations thereof.

Any of the steps, operations, or processes described herein may beperformed or implemented with one or more hardware or software modules,alone or in combination with other devices. In one embodiment, asoftware module is implemented with a computer program productcomprising a computer-readable medium containing computer program code,which can be executed by a computer processor for performing any or allof the steps, operations, or processes described.

Embodiments of the invention may also relate to an apparatus forperforming the operations herein. This apparatus may be speciallyconstructed for the required purposes, and/or it may comprise ageneral-purpose computing device selectively activated or reconfiguredby a computer program stored in the computer. Such a computer programmay be stored in a non-transitory, tangible computer readable storagemedium, or any type of media suitable for storing electronicinstructions, which may be coupled to a computer system bus.Furthermore, any computing systems referred to in the specification mayinclude a single processor or may be architectures employing multipleprocessor designs for increased computing capability.

Embodiments of the invention may also relate to a product that isproduced by a computing process described herein. Such a product maycomprise information resulting from a computing process, where theinformation is stored on a non-transitory, tangible computer readablestorage medium and may include any embodiment of a computer programproduct or other data combination described herein.

Finally, the language used in the specification has been principallyselected for readability and instructional purposes, and it may not havebeen selected to delineate or circumscribe the inventive subject matter.It is therefore intended that the scope of the invention be limited notby this detailed description, but rather by any claims that issue on anapplication based hereon. Accordingly, the disclosure of the embodimentsof the invention is intended to be illustrative, but not limiting, ofthe scope of the invention, which is set forth in the following claims.

1. A method comprising: receiving, from a client device, a first imageof a scene; receiving, from the device, a request to stylize the firstimage in a style of a reference image to generate a stylized image;generating a first noise mask associated with the first image; applyingthe first noise mask to the first image to generate a noisy version ofthe first image; generating the stylized image by applying an imagetransformation model to the noisy version of the first image, where theimage transformation model combines stylistic features of the referenceimage with spatial content of the first image, and wherein the imagetransformation model is a neural network model; and providing thestylized image to the client device.
 2. The method of claim 1, whereinthe first noise mask includes an array of pixel values randomly sampledfrom a Gaussian probability distribution.
 3. The method of claim 1,wherein the image transformation model is a deep convolutional neuralnetwork model.
 4. The method of claim 1, wherein parameters of the imagetransformation model are trained using the reference image.
 5. Themethod of claim 4, wherein the parameters of the image transformationmodel are trained by at least applying a loss network model to thereference image.
 6. The method of claim 1, wherein the first image isincluded in a video sequence, and the method further comprising:receiving, from the client device, a second image of the scene includedin the video sequence; generating a second noise mask associated withthe second image, the second noise mask generated by adjusting the firstnoise mask based on movement measurements of the client device from thefirst image to the second image; and applying the second noise mask tothe second image to generate a noisy version of the second image.
 7. Themethod of claim 6, wherein the movement measurements of the clientdevice are generated by a gyroscope sensor in the client device.
 8. Themethod of claim 6, wherein the movement measurements of the clientdevice are estimated by analyzing a homography between the first imageand the second image.
 9. The method of claim 6, wherein a same noisemask pattern is applied to a portion of the first image and a portion ofthe second image that include partially overlapping regions of thescene.
 10. The method of claim 6, wherein adjusting the first noise maskcomprises applying one or more geometric transformations to pixel valuesof the first noise mask.
 11. The method of claim 1, wherein receivingthe request to stylize the first image comprises receiving the referenceimage from the client device.
 12. A method comprising: receiving arequest to stylize a first image in a style of a reference image togenerate a stylized image; querying a database of image transformationmodels to identify an image transformation model associated with thereference image, where the image transformation model is generated by:generating an output image by applying the image transformation model toa training image, generating a down sampled version of the output image,applying a loss network model to the reference image, the trainingimage, and the down sampled version of the output image to generate aloss function, and determining a set of weights for the imagetransformation model based on the generated loss function; andgenerating the stylized image by applying the image transformation modelto the first image.
 13. The method of claim 12, further comprisinggenerating a down sampled version of the training image, and whereinapplying the loss network model to the training image comprises applyingthe loss network model to the down sampled version of the trainingimage.
 14. The method of claim 12, wherein applying the loss networkmodel to generate the loss function comprises: generating a content lossrepresenting difference between spatial features of the training imageand the output image; generating a style loss representing differencebetween stylistic features of the output image and the reference image;and combining the content loss and the style loss to generate the lossfunction.